import React from 'react';
// 导入Provider组件，用于给所有的组件提供数据
import { Provider } from 'react-redux'
// 导入store，数据在store中
import store from './store/index'
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
// 引入路由组件
// HashRouter hash模式；BrowserRouter history模式
import { BrowserRouter } from 'react-router-dom'
// 引入antd的样式
import 'antd/dist/antd.css';

ReactDOM.render(
  // Provider是父组件，通过父传子的方式向下传值
  <Provider store={store}>
    <BrowserRouter>
      <App />
    </BrowserRouter>
  </Provider>,
  document.getElementById('root')
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
